package com.ruoyi.test.domain;

import lombok.Data;

@Data
public class Dog extends Animal{//继承
    private String newAttr;

    public Dog(){

    }
    public Dog(String name){
        this.setName(name);
    }
    //重写超类同名方法
    @Override
    public void barking(){
        System.out.println("汪汪汪汪汪汪汪汪汪汪汪汪汪汪汪汪汪");
    }
}
